/**
 * Created by Administrator on 2018/4/13.
 */
import React from 'react';
import PropTypes from 'prop-types'

const 	Todo = ({ onClick, completed, text }) => (
	<span
		onClick={onClick}
		style={ {textDecoration: completed ? 'line-through' : 'none', marginRight: 15} }
	>
		{text}
		</span>
)

Todo.propTypes = {
	onClick: PropTypes.func.isRequired,
	completed: PropTypes.bool.isRequired,
	text: PropTypes.string.isRequired
}

export default Todo;
